package com.guguskins.back.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.List;

/**
 * <p>
 * 饰品表
 * </p>
 *
 * @author mybatis-plus
 * @since 2021-05-14
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("gu_goods")
@JsonInclude(JsonInclude.Include.NON_NULL)
public class GuGoods extends Model<GuGoods> {

    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @TableId(value = "goods_id", type = IdType.AUTO)
    private Long goodsId;

    /**
     * 饰品名
     */
    private String goodsName;

    /**
     * 同一id
     */
    private String goodsSameId;

    /**
     * 简称
     */
    private String goodsShortName;

    /**
     * 游戏id
     */
    private Long goodsAppId;

    /**
     * 游戏名
     */
    private String goodsGame;

    /**
     * 平台价格（咕币）
     */
    private BigDecimal goodsPrice;

    /**
     * 市场最低价
     */
    private BigDecimal goodsMarketMinPrice;

    /**
     * buff参考价格
     */
    private BigDecimal goodsQuickPrice;

    /**
     * buff展示最低价
     */
    private BigDecimal goodsSellMinPrice;

    /**
     * 求购数量
     */
    private Integer goodsSellNum;

    /**
     * icon图片
     */
    private String goodsIconUrl;

    /**
     * 原始icon图片
     */
    private String goodsOriginalIconUrl;

    /**
     * 等级
     */
    private Integer goodsLevel;

    /**
     * 外观
     */
    private String goodsTagExterior;

    /**
     * 类型
     */
    private String goodsTagType;

    /**
     * 品质
     */
    private String goodsTagQuality;

    /**
     * 武器
     */
    private String goodsTagWeapon;

    /**
     * 品质
     */
    private String goodsTagRarity;

    /**
     * 标签json数据
     */
    private String goodsTagJson;

    /**
     * 创建时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime goodsCreateTime;

    /**
     * 更新时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime goodsUpdateTime;

    @TableField(exist = false)
    private Long biId;

    /**
     * 权重
     */
    @TableField(exist = false)
    private BigDecimal probability;

    /**
     * 真实权重
     */
    @TableField(exist = false)
    private BigDecimal realProbability;

    @TableField(exist = false)
    private BigDecimal highProbability;

    /**
     * 爆率
     */
    @TableField(exist = false)
    private String explodeRate;

    @TableField(exist = false)
    private List<GuGoods> subGoodsList;

    @TableField(exist = false)
    private Integer flag;

    @TableField(exist = false)
    private Long inventoryId;

    @TableField(exist = false)
    private String userSteamId;

    @TableField(exist = false)
    private String userNickname;

    @TableField(exist = false)
    private String userImage;

    @TableField(exist = false)
    private BigDecimal oldGoodsPrice;

    @TableField(exist = false)
    private Integer state;

    @TableField(exist = false)
    private Integer rollGoodsId;

    @TableField(exist = false)
    private int goodsPriceType;

    @TableField(exist = false)
    private Long boxId;
    @TableField(exist = false)
    private GuBox box;


    @Override
    protected Serializable pkVal() {
        return this.goodsId;
    }

}
